//
//  PerMothView.h
//  TestCalendar
//
//  Created by yull on 14/12/2.
//  Copyright (c) 2014年 yull. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "PlanInfo.h"

@protocol PerMonthViewDelegate <NSObject>

- (void)clickAtDay:(NSInteger)day;

- (void)insertFailed:(NSString *)errorMsg;

@end

@interface PerMonthView : UIView <UICollectionViewDataSource,UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *dayCollectionView;

@property (nonatomic, assign) NSInteger dayCount;

@property (nonatomic, assign) NSInteger firstDay;

@property (nonatomic, assign) CGSize itemSize;

@property (nonatomic, strong) NSDictionary *planDict;

@property (nonatomic, assign) id <PerMonthViewDelegate> delegate;

- (void)reloadData;

- (BOOL)insertPlanInfo:(PlanInfo *)planInfo atPoint:(CGPoint)point;

- (void)insertPlanInfo:(PlanInfo *)planInfo;

- (void)deletePlanInfo:(PlanInfo *)planInfo;
@end
